//
//  SCApiTool.h
//  Scalper
//
//  Created by 王云 on 2017/9/13.
//  Copyright © 2017年 WY. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ZYJsonData.h"
@interface SCApiTool : NSObject


#pragma mark post 方法
+ (void)ZYPost:(NSString *)urlString
    parameters:(NSDictionary *)parameters
 netIdentifier:(NSString *)netIdentifier
      progress:(void (^)(NSProgress *progress))progressBlock
       success:(void (^)(ZYJsonData *data))successBlock
       failure:(void (^)(NSString *msg))failureBlock;





#pragma mark get 方法
+  (void)ZYGet:(NSString *)urlString
 netIdentifier:(NSString *)netIdentifier
      progress:(void (^)(NSProgress *progress))progressBlock
       success:(void (^)(ZYJsonData *data))successBlock
       failure:(void (^)(NSString *msg))failureBlock;


#pragma mark  上传文件
+ (void)ZYUpload:(NSString *)urlString
      parameters:(NSDictionary *)parameters
     uploadParam:(NSArray *)uploadParams
   netIdentifier:(NSString *)netIdentifier
        progress:(void (^)(NSProgress *))progressBlock
         success:(void (^)(ZYJsonData *data))successBlock
         failure:(void (^)(NSString *fail))failureBlock;



#pragma mark 入驻特殊POST 方法
+ (void)ZYPostStore_name:(NSString *)urlString
              parameters:(NSDictionary *)parameters
                   token:(NSString *)token
           netIdentifier:(NSString *)netIdentifier
                progress:(void (^)(NSProgress *progress))progressBlock
                 success:(void (^)(ZYJsonData *data))successBlock
                 failure:(void (^)(NSString *msg))failureBlock;

#pragma mark 带参数 get 方法
+  (void)ZYGet:(NSString *)urlString
parameters:(NSDictionary *)parameters
 netIdentifier:(NSString *)netIdentifier
      progress:(void (^)(NSProgress *progress))progressBlock
       success:(void (^)(ZYJsonData *data))successBlock
       failure:(void (^)(NSString *msg))failureBlock;


#pragma mark 二维码 get 方法
+  (void)ZYScanCodeGet:(NSString *)urlString
parameters:(NSDictionary *)parameters
 netIdentifier:(NSString *)netIdentifier
      progress:(void (^)(NSProgress *progress))progressBlock
       success:(void (^)(ZYJsonData *data))successBlock
       failure:(void (^)(NSString *msg))failureBlock;


#pragma mark 服务器返回错误处理
+ (NSString *)operateFail:(NSInteger)status
                      msg:(NSString *)msg
                       do:(void (^)())done;


+ (NSString *)ZYPostUrl:(NSString *)urlString;





#pragma mark 其他版本
#pragma mark
#pragma mark
#pragma mark

#pragma mark post 方法
+ (void)ZYVersionPost:(NSString *)urlString
               Accept:(NSString *)Accept
           parameters:(NSDictionary *)parameters
        netIdentifier:(NSString *)netIdentifier
             progress:(void (^)(NSProgress *progress))progressBlock
              success:(void (^)(ZYJsonData *data))successBlock
              failure:(void (^)(NSString *msg))failureBlock;


#pragma mark get 方法
+  (void)ZYVersionGet:(NSString *)urlString
               Accept:(NSString *)Accept
        netIdentifier:(NSString *)netIdentifier
             progress:(void (^)(NSProgress *progress))progressBlock
              success:(void (^)(ZYJsonData *data))successBlock
              failure:(void (^)(NSString *msg))failureBlock;

#pragma mark 带参数 get 方法
+  (void)ZYVersionGet:(NSString *)urlString
               Accept:(NSString *)Accept
           parameters:(NSDictionary *)parameters
        netIdentifier:(NSString *)netIdentifier
             progress:(void (^)(NSProgress *progress))progressBlock
              success:(void (^)(ZYJsonData *data))successBlock
              failure:(void (^)(NSString *msg))failureBlock;

#pragma mark  上传文件
+ (void)ZYVersionUpload:(NSString *)urlString
                 Accept:(NSString *)Accept
             parameters:(NSDictionary *)parameters
            uploadParam:(NSArray *)uploadParams
          netIdentifier:(NSString *)netIdentifier
               progress:(void (^)(NSProgress *))progressBlock
                success:(void (^)(ZYJsonData *data))successBlock
                failure:(void (^)(NSString *fail))failureBlock;


#pragma mark 带参数 get 方法  url无须拼接
+  (void)ZYVersionScanCodeGet:(NSString *)urlString
                       Accept:(NSString *)Accept
                   parameters:(NSDictionary *)parameters
                netIdentifier:(NSString *)netIdentifier
                     progress:(void (^)(NSProgress *progress))progressBlock
                      success:(void (^)(ZYJsonData *data))successBlock
                      failure:(void (^)(NSString *msg))failureBlock;



@end
